package com.wenjun.young.web.service.impl;


import com.wenjun.young.web.entity.WxUserEntity;
import com.wenjun.young.web.mapper.WxUserMapper;
import com.wenjun.young.web.service.UserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;

@Slf4j
@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private WxUserMapper userMapper;

    @Override
    public int insertWxUser(WxUserEntity entity) {
        entity.setDelFlag(false);
        entity.setCreateBy(entity.getNickName());
        entity.setCreateTime(new Date());
        return userMapper.insert(entity);
    }
}
